package com.design.decorator;

/**
 * @author leali
 * @title: DecoratorClient
 * @projectName design
 * @description: DecoratorClient
 * @date 2022/1/2 23:20
 */
public class DecoratorClient {
    public static void main(String[] args) {
        System.out.println("Test1");
        Component window = new Window();
        new ScrollBarDecorator(window).display();
        System.out.println("Test2");
        new BlackBorderDecorator(new ScrollBarDecorator(window)).display();
        System.out.println("Test3");
        Component textBox = new TextBox();
        new ScrollBarDecorator(textBox).display();
        System.out.println("Test4");
        new BlackBorderDecorator(new ScrollBarDecorator(textBox)).display();
    }
}
